package com.ruoyi.home.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.home.service.WorkBenchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static com.ruoyi.common.core.domain.AjaxResult.success;

/**
 * @author 梁国瑞
 * @version 1.0
 */
@RestController
@RequestMapping("/home/workbench")
public class WorkBenchController {

    @Autowired
    private WorkBenchService workBenchService;

    // 获取员工数量概况
    @GetMapping("/getEmployeeNum")
    public AjaxResult getEmployeeNum(){
        return success(workBenchService.employeeNum());
    }

    // 获取审批数量概况
    @GetMapping("/getApprovalNum")
    public AjaxResult getApprovalNum(){
        return success(workBenchService.getApprovalNum());
    }

    // 获取考核计划数量概况
    @GetMapping("/getAssessmentPlanNum")
    public AjaxResult getAssessmentPlanNum(){
        return success(workBenchService.getAssessmentPlanNum());
    }

    // 获取考勤数量情况
    @GetMapping("/getAttendanceNum")
    public AjaxResult getAttendanceNum(){
        return success(workBenchService.getAttendanceNum());
    }

}
